package LivenessCheckOfFreeChoiceNet;

public class Node {
	int id;
	int nsons=0;
	int depth=0;
	Node father=null;
	Node nextBrother=null;
	Node firstSon=null;
	boolean isAllZero=false;
	
	Node(int i)
	{
		id=i;
	}
	Node(int i,boolean flag)
	{
		id=i;
		isAllZero=flag;
	}
	public Node getNext()
	{
		if(this.firstSon!=null)return this.firstSon;
		if(this.nextBrother!=null) return this.nextBrother;
		Node temp=this.father;
		if (temp==null) return null;
		while(temp!=null)
		{
			if(temp.nextBrother!=null)return temp.nextBrother;
			temp=temp.father;
		}
		return null;
	}
}
